#ifndef _UTHREADS_H
#define _UTHREADS_H

/*
 *       User-Level Threads Library (uthreads)
 *       Author: OS, os@cs.huji.ac.il
 */

#define STACK_SIZE 10000   /* stack size per thread (in bytes) */
#define MAX_PRI 32

/* external interface */

/* Initialize thread library */
int thread_lib_init();

/* Create a new thread whose entry point is f */
int thread_spawn(void (*thread_func)(void), int priority);

/* Terminate a thread */
int thread_terminate(int tid); 

/* Sleep */
int thread_sleep(int tid, int num_millisecs);

/* Suspend */
int thread_suspend(int tid);

/* Resume */
int thread_resume(int tid);

/* Set Priority */
int thread_set_priority(int tid, int priority);

/* Get thread id */
int thread_gettid();


#endif

